package com.sxpi.xxjob.xxljob;

import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author: 董伟豪
 * @Date: 2022/11/1 12:54
 */
@Component
@Slf4j
public class MyXXLJOB {

    @Value("${server.port}")
    private int port;

    @XxlJob("myXxlJob")
    public void myDemo() throws InterruptedException {
        log.info("MyXXLJob execute........{}",port);
    }

}
